package planeticket;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int m;
        double price;
        String choice;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请依次输入原价 月份 舱室");
        price = scanner.nextDouble();
        m = scanner.nextInt();
        choice = scanner.next();
        if(m>=5&&m<=10)//旺季
        {
            if(choice.equals("经济舱"))
            {
                System.out.println("价格是"+price*0.85);
            }
            else if(choice.equals("头等舱"))
            {
                System.out.println("价格是"+price*0.9);
            }
            else
            {
                System.out.println("你输入的舱室有误");
            }
        }
        else if((m>=11&&m<=12)||(m>=1&&m<=4))
        {
            if(choice.equals("经济舱"))
            {
                System.out.println("价格是"+price*0.65);
            }
            else if(choice.equals("头等舱"))
            {
                System.out.println("价格是"+price*0.7);
            }
            else
            {
                System.out.println("你输入的舱室有误");
            }
        }
        else
        {
            System.out.println("你输入的月份有误");
        }
    }
}
